//
//  Data.m
//  FLLGodOfCookery
//
//  Created by LL.F on 16/8/30.
//  Copyright © 2016年 LL.F. All rights reserved.
//

#import "Data.h"
#import "SecondData.h"

@implementation Data

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [SecondData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<SecondData *> *dataArray = [NSMutableArray array];
        for (NSDictionary *songsDic  in value) {
            SecondData *secondData = [SecondData modelWithDic:songsDic];
            [dataArray addObject:secondData];
        }
        _data = dataArray;
    }
}
@end
